var isCache = true; //是否有缓存
try {
    mp.stop();
    Utility.keyConvert();
} catch (e) {
    // statements
    console.log(e);
}



//获取机顶盒或浏览器信息
var env = evm.getStbBrowser();

function cookie(k, v) {
    if (v != undefined && typeof v == 'string') {
        evm.cookie(k, v);
        return;
    }
    if (!!evm.cookie(k)) {
        return evm.cookie(k);
    }
}
/*
 * $cmsIndex首页视图模块
 * 依赖:
 */
var cmsIndex = (function () {
    var mod = {};

    //配置项
    var config = mod.config = {
        //开启cookie开关
        cookieSwitch: true,
        cookieKey: 'cmsIndex',
        //模拟数据配置
        mockData: {
            //URI查询标示符
            key: '[mdata]',
            //文件目录
            dir: '../source/mockData'
        },
        //调试输出开关
        debug: false
    };

    var localData = mod.localData = {
        indexSource: '[mdata]/index.js'
    };
    //接口数据缓存
    var jsonCache = {};

    //各模块焦点切换的配置
    var modules = mod.modules = [];

    //当前模块的索引值,被引用的模块
    moduleId = 0,
        module = null,
        moduleGuid = 0,
        moduleCount = -1;

    mod.addModule = function () {
        return moduleCount += 1;
    };

    //moduleGuid存取器
    mod.moduleGuid = function (id) {
        if (typeof id == 'number') moduleGuid = id;
        return moduleGuid;
    };

    if (config.cookieSwitch && config.cookieKey) {
        //read cookie
        var pageCookie = cookie(config.cookieKey);
        if (pageCookie) {
            pageCookie = pageCookie.split(',');

            if (pageCookie.length > 0) {
                var moduleCookie = mod.moduleCookie = pageCookie[0].split('.');

                if (pageCookie[1]) {
                    var viewportCookie = mod.viewportCookie = moduleCookie;
                    moduleCookie = mod.moduleCookie = pageCookie[1].split('.');

                }
                if (pageCookie[2]) {
                    var parentCookie = mod.parentCookie = pageCookie[2].split('.');
                }
            }
        }

        //清除cookie
        evm.cutCookie(config.cookieKey);
    }
    //添加视图按键管理器
    mod.addListener = function () {
        evm.controller.subscribe({
            type: 1,
            method: 'add',
            callback: mod.grabEvent,
            context: mod
        });
    };
    // // console.log(mod)
    //移除视图按键管理器
    mod.removeListener = function () {
        // console.log( mod.grabEvent,'removeListener')
        evm.controller.subscribe({
            type: 1,
            method: 'remove',
            callback: mod.grabEvent,
            context: mod
        });

    };
    // // console.log(module)
    //视图按键管理

    mod.grabEvent = function (key) {
        // console.log(key, 'key')
        var me = mod;
        //拦截返回键,方法返回isBlock是1或0,默认0不拦截
        var isBlock = 0;

        if (module && module.grabEvent) {
            isBlock = module.grabEvent(key) || 0;
        }

        return isBlock;
    };
    //模块存取器
    mod.module = function (mID) {
        if (modules[mID]) {
            module = modules[mID].module || null;
        }

        return module;
    };

    //切换当前模块
    mod.handle = function (directive) {
        var me = mod;
        if (modules[moduleId].map &&
            (typeof modules[moduleId].map[directive] == 'number')) {

            moduleId = modules[moduleId].map[directive];

            return me.module(moduleId);
        }
    };
    mod.paint = function () {
        var me = mod;
        modelInit();
        me.addListener();
        return me;
    };

    mod.run = function () {
        var me = mod;
        //默认moduleId = 0 导航栏
        //cookie得到焦点

        var nav = mod.module(moduleId);
        cmsIndex.handle('right');
        //控制器管理按键
        evm.on(document, (!env.stb ? 'keydown' : (env.stb == 'iPanel' ?
            'irkeypress' : 'keydown')), evm.controller, evm);

        me.paint();

        return me;
    };

    return mod;

})();


//ajax 封装  请先于api.js 注册
function GetDatas(url, params, callback) { //地址名，参数内容
    // console.log(API_URL.baseURL + API_URL[url])
    http(API_URL.baseURL + API_URL[url], params, callback)
}

function http(url, params, callback) {
    // console.log(params)
    var str = '?'
    for (var key in params) {
        // console.log(key,params[key])
        str += key + '=' + params[key] + '&'
    }
    str = str.substr(0, str.length - 1);
    // console.log(str)

    var ajax = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');

    ajax.open('get', url + str, true);
    ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    ajax.send();
    ajax.onreadystatechange = function () {
        // console.log(ajax)
        if (ajax.readyState == 4 && ajax.status == 200) {
            var text = ajax.responseText;
            //alert(text);
            var response;
            if (text.length != 0) {
                response = eval("(" + text + ")");
                callback(null, response)
            } else {
                callback(null);
            }

            console.log(response);
        }
    }

}


// function http(url, params, callback) {
//     $.ajax({
//         type: 'get',
//         dataType: "jsonp",
//         data: params,
//         jsonp: "callback",
//         async: false,
//         url: url,
//         success: function (data) {
//                 callback(null, data)
//         },
//         error: function (xhr, textStatus, errorThrown) {
//             callback(errorThrown)
//         }
//     });
// }
// 判断盒号在电脑上与在电视上运行
function hardwareOpt() {
    var cardNo = '';
    try {
        cardNo = hardware.STB.serialNumber
    } catch (err) {
        // cardNo =''

    }
    return cardNo
}

(function (window) {


    var window = window,
        TV = function (selector, root) {
            if (typeof selector !== 'string') {
                return;
            };
            return new Evm.uber.init(selector.replace(/^\s*|\s$/g, ''), root);
        };
    //路由劫持
    var arr = window.location.pathname.split('/');
    var pageName = arr[arr.length - 1];
    // console.log(pageName)
    switch (pageName) {
        case 'shop.html':
        case 'integral.html':
            if (!($.cookie('TV_CST_NAME') && $.cookie('TV_CST_NAME') != 'null')) {
                window.location.href = '../pages/login.html'
            }
            break;
        default:
            break;
    }
    TV.userLogin = function () { //自动登录

        var random = parseInt(Math.random() * 10000);
        var scankey = hex_md5(hardware.smartCard.serialNumber + random);
        var params = {
            sign: scankey,
            rand: random,
            smartcardno: hardware.smartCard.serialNumber
        }
        // TV.PromptMsg(params.smartcardno)
        http(API_URL.loginURL + 'home/auth/getCardnoCode', params, function (err, res) {
            var code = res.data.code;

            var mess = {
                code: code,
                cardno: hardware.STB.serialNumber,
                sign: scankey
            }
            http(API_URL.loginURL + 'home/auth/getAccessToken', mess, function (err, data) {
                // TV.PromptMsg(data.code)
                if (data.code == '803' || data.code == '803') {
                    window.location.href = '../pages/login.html'
                } else {
                    $.cookie('TV_CST_TOKEN', data.data.access_token, {
                        path: '/'
                    });
                }

                // var test = {
                //     access_token: data.data.access_token
                // }
                // http(API_URL.baseURL + 'user/userinfo', test, function (err, data) {
                //     console.table(data.data)
                //     $.cookie('TV_CST_NAME', data.data.nick_name, { path: '/' });
                //     $.cookie('TV_CST_HEADIMG', data.data.head_img, { path: '/' });
                //     var moblie = data.data.mobile || null;
                //     $.cookie('TV_CST_MOBILE', moblie, { path: '/' });
                //     window.history.go(-1)
                // })
            })
        })
    }
    //用户登录信息
    TV.UserMess = function () { //用户名称
        var str = '';
        var username = $.cookie('TV_CST_NAME');
        var userImg = $.cookie('TV_CST_HEADIMG');
        // console.log(username)

        var user = username && username != 'null' ? username : '请登录'
        str += '  <div id="login"><div id="userName">' + user + '</div>';
        if (userImg && userImg != 'null') {
            str += '<div class=" head-img user-img">';
            str += "<img src=" + API_URL.imgURL + userImg + ">"
            str += '</div>';
        } else {
            str += '<div class="head-img"></div>';
        }

        str += '</div>';
        $('body').append(str)

        // if(userImg){
        //     // console.log()
        //     $('.head-img').attr("style", "background: url("+userImg+");");
        //     $('.head-img').attr("style", "background-size: 100% 100%");
        // }

        return username && username != 'null' ? 1 : 0
    }
    //非列表页操作
    TV.IndexOpt = function (containerId, listName, index) { //外层id,内层模块name,位置
        var elem = $("#" + containerId).children("." + listName);
        console.log(elem[index], index)
        var elemHeader = $(".head-img");
        elemHeader.removeClass("header-active");
        // console.log(index)
        for (var i = 0; i < elem.length; i++) {
            elem[i].className = listName;
        }
        if (index == -1) {
            elemHeader.addClass("header-active");
        } else if (elem[index]) {
            elem[index].className = elem[index].className + ' active';
        }
    }

    //提示 自适应内容大小    
    TV.PromptMsg = function (title, timeout) { //内容，时间 
        var str = '';
        var msg = title ? title : '请输入提示内容';
        var time = timeout || 2000;
        // console.log()
        if ($('#pormptMsg').length == 0) {
            str = '<div class="pormpt-div" id="pormptMsg">' +
                msg +
                '</div>'
            $("body").append(str);
        } else {
            $('#pormptMsg').html(msg)
            $('#pormptMsg').attr("style", "display:block");
        }

        setTimeout(function () {
            $('#pormptMsg').fadeOut()
        }, time);
    };

    //取url参数
    TV.GetParam = function (Name) {
        var paramName = Name ? Name : 'id'
        paramValue = "";
        isFound = false;
        if (window.location.search.indexOf("?") == 0 && window.location.search.indexOf("=") > 1) {
            arrSource = decodeURI(window.location.search).substring(1, window.location.search.length).split("&");
            i = 0;
            while (i < arrSource.length && !isFound) {
                if (arrSource[i].indexOf("=") > 0) {
                    if (arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase()) {
                        paramValue = arrSource[i].split("=")[1];
                        isFound = true;
                    }
                }
                i++;
            }
        }
        return paramValue;
    }

    //键值包装转换
    TV.GetKey = function (key) {
        var keyState = '';
        //拦截返回键,方法返回isBlock是1或0,默认0不拦截
        var isBlock = 0;
        switch (key) {
            case keymap.Enrich.UP:
            case keymap.iPanel.UP:
            case keymap.DVN.UP:
                keyState = 'up';
                break;
            case keymap.Enrich.DOWN:
            case keymap.iPanel.DOWN:
            case keymap.DVN.DOWN:
                keyState = 'down';
                break;
            case keymap.Enrich.LEFT:
            case keymap.iPanel.LEFT:
            case keymap.DVN.LEFT:
                keyState = 'backwards';
                break;
            case keymap.Enrich.RIGHT:
            case keymap.iPanel.RIGHT:
            case keymap.DVN.RIGHT:
                keyState = 'forwards';
                break;
            case keymap.SELECT:
            case keymap.SELECT2:
                keyState = 'enter';
                break;
            case keymap.Enrich.BACK:
            case keymap.iPanel.BACK:
            case keymap.DVN.BACK:
                keyState = 'back';
                break;
            case keymap.Inspur.EXIT:
            case keymap.iPanel.EXIT:
            case 0:
                window.location.href = "index.html";
                break;
        }
        return json = {
            keyState: keyState,
            isBlock: isBlock
        };
    }

    //面包屑
    TV.structure = function (title) {
        // console.log(arr)
        str = '<div class="crumbsTitle">' + title + '</div>'
        $('body').append(str);

    }
    // 文章自动播放
    TV.articleMove = function (directive, thisContain, thisDetail, time) {
        var timeMove = time || 20;
        var thisContain = document.getElementById(thisContain);
        var thisIntro = document.getElementById(thisDetail);
        clearInterval(articleRun);

        function Marquee() {
            if (directive == 'down') {
                if (thisIntro.scrollHeight - thisContain.scrollTop <= thisContain.offsetHeight - 5) {
                    clearInterval(articleRun);
                } else {
                    thisContain.scrollTop++
                }
            } else {
                if (thisContain.scrollTop == 0) {
                    clearInterval(articleRun);
                } else {
                    thisContain.scrollTop--
                }
            }
            // console.log('内容高度',thisIntro.scrollHeight,'内容高度',thisContain.scrollTop,'容器顶部', thisContain.offsetHeight,'容器高度',thisIntro.offsetHeight)
        }
        articleRun = setInterval(Marquee, timeMove)
    }

    //列表操作   
    TV.ListOperation = function (json) {
        this.direction = json.direction !== undefined && json.direction !== null && json.direction !== '' && json.direction ? json.direction : ''; // 方向 回退的位置  默认无，为单列表界面
        this.structure = json.structure !== undefined && json.structure !== null && json.structure !== '' && json.structure ? json.structure : 1; // 结构 左右结构或上下结构  确保direction不为空 默认左右
        this.type = json.type !== undefined && json.type !== null && json.type !== '' && json.type ? parseInt(json.type) : 1; //  类型 1 是多行单列 2是多列单行 3 是多行多列  默认是多行单列
        this.isLike = json.isLike !== undefined && json.isLike !== null && json.isLike !== '' && json.isLike ? json.isLike : false; // 是否开启点赞功能 默认是否
        this.status = json.status !== undefined && json.status !== null && json.status !== '' && json.status ? json.status : 1; // 框位置 1在外框0在点赞框 默认外框
        this.key = json.key; //  操作键位 backwards左 forwards右 up上 down下 pageUph上一页 pageDown下一页 必填 无默认
        this.nowPage = json.nowPage ? parseInt(json.nowPage) : 1; //当前页数
        this.totalPage = json.totalPage ? parseInt(json.totalPage) : 1; //总页数
        this.pageSize = json.pageSize ? parseInt(json.pageSize) : 1; //列表总数
        this.length = json.length ? parseInt(json.length) : 1; //实际列表数量 
        this.index = parseInt(json.index); //坐标位置
        this.rowHeight = json.rowHeight ? parseInt(json.rowHeight) : 2; //多列模块行数
        this.isMenu = json.isMenu || 0

    }

    TV.ListOperation.prototype = {
        init: function () {
            this.Operation();
        },
        operation: function () {
            var position = ''; //下一页or下一页
            var direction = ''; //退出模块的方向

            switch (this.type) {
                case 1: //多行单列
                    switch (this.key) {
                        case 'backwards': //左
                            if (this.isLike && this.status == '0') { //开启点赞且状态为选中点赞框
                                this.status = '1'
                            } else {
                                if (this.nowPage > 1) { //当前页数不是第一页
                                    this.nowPage--; //上一页
                                    position = 'previous';
                                } else if (this.direction != '' && this.structure == 1) {
                                    direction = this.direction;
                                }
                            }
                            break;
                        case 'forwards': //右
                            this.status = this.status == '1' && this.isLike ? '0' : '1';
                            if (this.status == '1' && this.nowPage != this.totalPage) { //不是最后一页
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            break;
                        case 'up': //上
                            if (this.status == '1') {
                                if (this.index == 0 && this.nowPage > 1) { //在最上面的位置且不是第一页
                                    this.nowPage--; //上一页
                                    position = 'previous';
                                } else if (this.index > 0) {
                                    this.index--;
                                } else if (this.index == 0 && this.nowPage == 1 && this.isMenu == 1) {
                                    direction = 'menu';
                                } else if (this.structure == 2 && this.index == 0 && this.nowPage == 1) {
                                    direction = this.direction;
                                }
                            }
                            break;
                        case 'down': //下
                            if (this.status == '1' && ++this.index >= this.length && this.nowPage != this.totalPage) { //不是在最后一页
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            if (this.index >= this.length) {
                                this.index = this.length - 1;
                            }

                            break;
                        case 'pageUp': //上一页
                            if (this.nowPage > 1) {
                                this.nowPage--; //上一页
                                position = 'previous';
                            }
                            break;
                        case 'pageDown': //下一页
                            if (this.nowPage != this.totalPage) {
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            break;
                    }
                    break;
                case 2: //单行多列
                    switch (this.key) {
                        case 'backwards': //左
                            if (this.nowPage == 1 && this.index == 0 && this.structure == 1) {
                                direction = this.direction;
                            } else if (this.nowPage <= this.totalPage && this.nowPage > 1 && this.index == 0) {
                                this.nowPage--; //上一页
                                position = 'previous';
                            } else if (this.index > 0) {
                                this.index--;
                            }
                            break;
                        case 'forwards': //右
                            if (this.status == '1' && ++this.index >= this.length && this.nowPage != this.totalPage) { //不是在最后一页
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            if (this.index >= this.length) {
                                this.index = this.length - 1;
                            }
                            break;
                        case 'up': //上
                            // console.log(this.nowPage == 1 && this.structure == 2 && this.status == '1')
                            if (this.nowPage == 1 && this.structure == 2 && this.status == '1') {
                                // console.log(66)
                                direction = this.direction;
                            } else if (this.isLike && this.status == '0') { //开启点赞且状态为选中点赞框
                                this.status = '1'
                            } else {
                                if (this.nowPage > 1) { //当前页数不是第一页
                                    this.nowPage--; //上一页
                                    position = 'previous';
                                }
                            }
                            break;
                        case 'down': //下
                            if (this.isLike && this.status == '1') { //开启点赞且状态为选中点赞框
                                this.status = '0'
                            } else if (this.status == '1' && this.nowPage != this.totalPage) { //不是最后一页
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            break;
                        case 'pageUp': //上一页
                            if (this.nowPage > 1) {
                                this.nowPage--; //上一页
                                position = 'previous';
                            }
                            break;
                        case 'pageDown': //下一页
                            if (this.nowPage != this.totalPage) {
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            break;
                    }
                    break;
                case 3: //多行多列
                    var munden = this.pageSize / this.rowHeight;
                    // console.log(munden)
                    switch (this.key) {
                        case 'backwards': //左
                            // if (this.status == '1') { //开启点赞且状态为选中点赞框
                            if (this.direction != '' && this.nowPage == 1 && this.index == 0 && this.structure == 1) {
                                direction = this.direction;
                            } else if (this.nowPage > 1 && this.index == 0) { //非第一页且第一个位置
                                this.nowPage--; //上一页
                                position = 'previous';
                            } else if (this.index == 0 && this.nowPage == 1 && this.isMenu == 1 && this.structure == 2) {
                                direction = 'menu';
                            } else if (this.index > 0) {
                                this.index--;
                            }
                            // }
                            break;
                        case 'forwards': //右
                            if (++this.index >= this.length && this.nowPage != this.totalPage) { //当在最一个位置且并不是最后一页的时候 
                                this.nowPage++; //下一页
                                position = 'next';
                            } else if (this.nowPage == this.totalPage && this.index == this.length) {
                                this.index--;
                            }
                            break;
                        case 'up': //上
                            if (this.isLike && this.status == '0') {
                                this.status = '1'
                            } else {
                                if (this.direction != '' && this.index < munden && this.nowPage == 1 && this.structure == 2) {
                                    direction = this.direction;
                                } else if (this.index >= 0 && this.index < munden && this.nowPage > 1) { //当前页数不是第一页且是最上面的一行
                                    this.nowPage--; //上一页
                                    position = 'previous';
                                } else if (this.index >= munden) {
                                    this.index -= munden;
                                }
                            }
                            break;
                        case 'down': //下
                            this.status = this.status == '1' && this.isLike ? '0' : '1';
                            if (this.status == '1') {
                                // console.log(this.index, this.pageSize, munden)
                                if (this.index >= this.pageSize - munden && this.nowPage != this.totalPage) { //当位置在最下面一行且并不是最后一页
                                    this.nowPage++; //下一页
                                    position = 'next';
                                } else if (this.index < this.pageSize - munden) {
                                    this.index += munden;
                                }
                                if (this.index >= this.length) {
                                    this.index = this.length - 1;
                                }
                            }
                            break;
                        case 'pageUp': //上一页
                            if (this.nowPage > 1) {
                                this.nowPage--; //上一页
                                position = 'previous';
                            }
                            break;
                        case 'pageDown': //下一页
                            if (this.nowPage != this.totalPage) {
                                this.nowPage++; //下一页
                                position = 'next';
                            }
                            break;
                    }
                    break;
                default:
                    break;
            }

            var backJson = {
                direction: direction, //非单列表情况，返回的位置
                index: this.index, //当前位置
                status: this.status, //外框内框
                nowPage: this.nowPage, //当前页数
                position: position //上一页 or 下一页
            }
            return backJson;
        }
    }

    //cookie操作
    TV.CookieOpt = function (json) { //是否是返回,index
        this.json = json ? json : {};
    }
    TV.CookieOpt.prototype = {

        cookieName: 'TV__CST_' + window.location.pathname,

        clean: function () {
            $.cookie(this.cookieName, null);
        },
        setOpt: function () {
            this.cookieTv = $.cookie(this.cookieName);
            // console.log(this.cookieTv)
            if (this.cookieTv && this.cookieTv != 'null') {
                $.cookie(this.cookieName, null);
            } else {
                var cookieValue = '';
                for (var key in this.json) {
                    cookieValue += '&' + key + '=' + this.json[key];
                }
                // var cookieValue = 'leftPage=' + this.leftPage + '&leftIndex=' + this.leftIndex + '&rightPage=' + this.rightPage + '&index=' + this.index;
                $.cookie(this.cookieName, cookieValue, {
                    expires: 1
                });
            }
        },
        getOpt: function () {
            this.cookieTv = $.cookie(this.cookieName);
            // console.log(this.cookieTv)

            if (this.cookieTv) {
                var cookList = this.cookieTv.split("&");
                // // console.log(cookList)
                cookList.shift();
                var json = {};
                for (var i = 0; i < cookList.length; i++) {
                    var arr = cookList[i].split('=');
                    json[arr[0]] = parseInt(arr[1]);
                }
                $.cookie(this.cookieName, null);
                return json;
            }

        }

    }


    if (typeof window === 'object') {
        window.TV = TV;
    }
}(window))

//  页面统计
;
(function () {
    var GetUrl = function () {
        this.flag = 0;
        this.id = 0;
        this.tjapi = API_URL.loginURL;
        this.tpe = 1;
        this.platf = 0;
        this.detailId = 0;
        this.locationUrl = window.location.href;
    }
    GetUrl.prototype = {
        init: function () {
            this.urlOpt();
        },
        urlOpt: function () {
            this.arr = this.locationUrl.split('?')
            // console.log(this.arr)
            if (this.arr.length > 0) {
                var nameList = [];
                nameList = this.arr[0].split('/')
                this.name = nameList[nameList.length - 1]
                if (this.arr.length == 2) {
                    this.id = TV.GetParam('id') ? TV.GetParam('id') : 0
                    // console.log(this.id)
                }
            }
            this.postview();
        },
        postview: function () {
            // console.log(this.name)
            // console.log(this.name)
            switch (this.name) {
                case '':
                    this.platf = 99;
                    break;
                case 'theoretical.html':
                    this.platf = 1;
                    break;
                case 'education.html':
                    this.platf = 2;
                    break;
                case 'culture.html':
                    this.platf = 3;
                    break;
                case 'science.html':
                    this.platf = 4;
                    break;
                case 'volunteer.html':
                    this.platf = 6;
                    break;
                case 'sports.html':
                    this.platf = 5;
                    break;
                case 'infoListActivity.html':
                    this.tpe = 2;
                    break;
                case 'play.html':
                    // this.flag = ;
                    this.detailId = this.id;
                    break;
                case 'activeDetail.html':
                    this.detailId = this.id;
                    break;
                case 'articleDetail.html':
                    this.detailId = this.id;
                    break;
                case 'wordDetail.html':
                    this.detailId = this.id;
                    break;
                default:
                    this.platf = 0;
                    break;
            }
            // console.log(this.platf)
            if (this.flag == 0) {
                var access_token = $.cookie('TV_CST_TOKEN');
                if(access_token == undefined || access_token == ''){
                    var params = {
                        device: 'tv',
                        cardNo: hardwareOpt(),
                        // cardNo: 555,
                        platf: this.platf,
                        tpe: this.tpe,
                        category: this.id,
                        id: this.detailId
                    }
                }else{
                    var params = {
                        device: 'tv',
                        cardNo: hardwareOpt(),
                        // cardNo: 555,
                        platf: this.platf,
                        tpe: this.tpe,
                        category: this.id,
                        id: this.detailId,
                        access_token: access_token
                    }
                }
                
                http(this.tjapi + '/api/v2/commons/postview', params, function (err, res) {
                    console.log(res)
                })
            }
        },
    }
    return new GetUrl().init();
}())